


clear 
set scheme lean2, permanent
global pm = char(177)
set more off

gl date = c(current_date)
if c(os) == "MacOSX" gl user "/Users/`c(username)'"
else if c(os) == "Windows" gl user "C:\Users\\`c(username)'"
else if c(os) == "Unix" gl user "/usr/`c(username)'"
di "$user

set graphics on  

global path_data_processed "\data\processed"
global path_output "\data\output"


 
clear all
set more off
 
cd "$path_data_processed"
use "experimentRNall.dta", clear
 
 
 
 cd "$path_output"
 
  set scheme lean2

 
***** I) prior and posterior beliefs about receccsion*****

hist prior if treatment==0, xtitle("Prior: Treatment 5 %") bin(20)
graph save "prior_hist_5.gph", replace
hist posterior if treatment==0, xtitle("Posterior: Treatment 5 %") xline(5, lwidth(thick) lc(black)) bin(20)
graph save "posterior_hist_5.gph", replace
hist posterior_f if treatment==0, xtitle("Posterior in follow-up: Treatment 5 %") xline(5, lwidth(thick) lc(black)) bin(20)
graph save "posterior_followup_hist_5.gph", replace
hist prior if treatment==1, xtitle("Prior: Treatment 35 %") bin(20)
graph save "prior_hist_35.gph", replace
hist posterior if treatment==1, xtitle("Posterior: Treatment 35 %") xline(35, lwidth(thick) lc(black)) bin(20)
graph save "posterior_hist_35.gph", replace
hist posterior_f if treatment==1, xtitle("Posterior in follow-up: Treatment 35 %") xline(35, lwidth(thick) lc(black)) bin(20)
graph save "posterior_followup_hist_35.gph", replace
graph combine "prior_hist_5.gph" "prior_hist_35.gph" "posterior_hist_5.gph" "posterior_hist_35.gph" "posterior_followup_hist_5.gph" "posterior_followup_hist_35.gph", xcommon ycommon col(2)  xsize(2) ysize(2.5) iscale(*.9)
graph export "priorposterior_hist.pdf", replace




